package com.uyayo.notepad.service;

import com.uyayo.framework.common.exception.ParentNotFoundException;
import com.uyayo.framework.core.service.IBaseService;
import com.uyayo.notepad.entity.NoteCategory;
import com.uyayo.notepad.model.NoteCategoryCondition;

import java.util.List;

public interface NoteCategoryService extends IBaseService<NoteCategory>{

	List<NoteCategory> selectNoteCategory(NoteCategoryCondition noteCategoryCondition);

	/**
	 * 根据上级Id获取记录数
	 * @param parentId 上级id
	 * @return int
	 */
	int selectCountByParentId(Long parentId);

	int saveNoteCategory(NoteCategory noteCategory) throws ParentNotFoundException;

	int updateNoteCategory(NoteCategory noteCategory) throws ParentNotFoundException;

	int deleteNoteCategory(Long id);
}
